#!/usr/bin/env bash

TMP="/tmp/$RANDOM"
mkdir ${TMP}

if [ -d ${TMP} ]; then
    mkdir ${TMP}/db-schema2omnigraffle
    if [ -d ${TMP}/db-schema2omnigraffle ]; then
        cp *.txt ${TMP}/db-schema2omnigraffle/
        cp *.applescript ${TMP}/db-schema2omnigraffle/
        cd ${TMP}
        zip db-schema2omnigraffle.zip db-schema2omnigraffle/*
        cp db-schema2omnigraffle.zip ~/Desktop/
        rm -rf ${TMP}/db-schema2omnigraffle
    fi
fi